
import { InjectionToken } from '@angular/core';
import { NgTimConfig } from './type';

export const NG_Tim_CONFIG = new InjectionToken<NgTimConfig>('config');

export enum MESSAGE_STATUS {
  success = 'success',
  info = 'info',
  warning = 'warning',
  error = 'error'
}

export enum CONVERSATION_TYPE {
  client = 'C2C',
  group = 'GROUP',
  system = '@TIM#SYSTEM',
}
export enum TIM_TYPES {
  GRP_WORK = 'Private',
  GRP_PUBLIC = 'Public',
  GRP_MEETING = 'ChatRoom',
  GRP_AVCHATROOM = 'AVChatRoom',
}

export const TIM = {
  TYPES: {
    "MSG_TEXT": "TIMTextElem",
    "MSG_IMAGE": "TIMImageElem",
    "MSG_SOUND": "TIMSoundElem",
    "MSG_AUDIO": "TIMSoundElem",
    "MSG_FILE": "TIMFileElem",
    "MSG_FACE": "TIMFaceElem",
    "MSG_VIDEO": "TIMVideoFileElem",
    "MSG_GEO": "TIMLocationElem",
    "MSG_GRP_TIP": "TIMGroupTipElem",
    "MSG_GRP_SYS_NOTICE": "TIMGroupSystemNoticeElem",
    "MSG_CUSTOM": "TIMCustomElem",
    "MSG_MERGER": "TIMRelayElem",
    "MSG_PRIORITY_HIGH": "High",
    "MSG_PRIORITY_NORMAL": "Normal",
    "MSG_PRIORITY_LOW": "Low",
    "MSG_PRIORITY_LOWEST": "Lowest",
    "CONV_C2C": "C2C",
    "CONV_GROUP": "GROUP",
    "CONV_SYSTEM": "@TIM%23SYSTEM",
    "CONV_AT_ME": 1,
    "CONV_AT_ALL": 2,
    "CONV_AT_ALL_AT_ME": 3,
    "GRP_PRIVATE": "Private",
    "GRP_WORK": "Private",
    "GRP_PUBLIC": "Public",
    "GRP_CHATROOM": "ChatRoom",
    "GRP_MEETING": "ChatRoom",
    "GRP_AVCHATROOM": "AVChatRoom",
    "GRP_MBR_ROLE_OWNER": "Owner",
    "GRP_MBR_ROLE_ADMIN": "Admin",
    "GRP_MBR_ROLE_MEMBER": "Member",
    "GRP_TIP_MBR_JOIN": 1,
    "GRP_TIP_MBR_QUIT": 2,
    "GRP_TIP_MBR_KICKED_OUT": 3,
    "GRP_TIP_MBR_SET_ADMIN": 4,
    "GRP_TIP_MBR_CANCELED_ADMIN": 5,
    "GRP_TIP_GRP_PROFILE_UPDATED": 6,
    "GRP_TIP_MBR_PROFILE_UPDATED": 7,
    "MSG_REMIND_ACPT_AND_NOTE": "AcceptAndNotify",
    "MSG_REMIND_ACPT_NOT_NOTE": "AcceptNotNotify",
    "MSG_REMIND_DISCARD": "Discard",
    "GENDER_UNKNOWN": "Gender_Type_Unknown",
    "GENDER_FEMALE": "Gender_Type_Female",
    "GENDER_MALE": "Gender_Type_Male",
    "KICKED_OUT_MULT_ACCOUNT": "multipleAccount",
    "KICKED_OUT_MULT_DEVICE": "multipleDevice",
    "KICKED_OUT_USERSIG_EXPIRED": "userSigExpired",
    "ALLOW_TYPE_ALLOW_ANY": "AllowType_Type_AllowAny",
    "ALLOW_TYPE_NEED_CONFIRM": "AllowType_Type_NeedConfirm",
    "ALLOW_TYPE_DENY_ANY": "AllowType_Type_DenyAny",
    "FORBID_TYPE_NONE": "AdminForbid_Type_None",
    "FORBID_TYPE_SEND_OUT": "AdminForbid_Type_SendOut",
    "JOIN_OPTIONS_FREE_ACCESS": "FreeAccess",
    "JOIN_OPTIONS_NEED_PERMISSION": "NeedPermission",
    "JOIN_OPTIONS_DISABLE_APPLY": "DisableApply",
    "JOIN_STATUS_SUCCESS": "JoinedSuccess",
    "JOIN_STATUS_ALREADY_IN_GROUP": "AlreadyInGroup",
    "JOIN_STATUS_WAIT_APPROVAL": "WaitAdminApproval",
    "GRP_PROFILE_OWNER_ID": "ownerID",
    "GRP_PROFILE_CREATE_TIME": "createTime",
    "GRP_PROFILE_LAST_INFO_TIME": "lastInfoTime",
    "GRP_PROFILE_MEMBER_NUM": "memberNum",
    "GRP_PROFILE_MAX_MEMBER_NUM": "maxMemberNum",
    "GRP_PROFILE_JOIN_OPTION": "joinOption",
    "GRP_PROFILE_INTRODUCTION": "introduction",
    "GRP_PROFILE_NOTIFICATION": "notification",
    "GRP_PROFILE_MUTE_ALL_MBRS": "muteAllMembers",
    "NET_STATE_CONNECTED": "connected",
    "NET_STATE_CONNECTING": "connecting",
    "NET_STATE_DISCONNECTED": "disconnected",
    "MSG_AT_ALL": "__kImSDK_MesssageAtALL__"
  },
  EVENT: {
    "SDK_READY": "sdkStateReady",
    "SDK_NOT_READY": "sdkStateNotReady",
    "SDK_DESTROY": "sdkDestroy",
    "MESSAGE_RECEIVED": "onMessageReceived",
    "MESSAGE_REVOKED": "onMessageRevoked",
    "MESSAGE_READ_BY_PEER": "onMessageReadByPeer",
    "CONVERSATION_LIST_UPDATED": "onConversationListUpdated",
    "GROUP_LIST_UPDATED": "onGroupListUpdated",
    "GROUP_SYSTEM_NOTICE_RECEIVED": "receiveGroupSystemNotice",
    "PROFILE_UPDATED": "onProfileUpdated",
    "BLACKLIST_UPDATED": "blacklistUpdated",
    "KICKED_OUT": "kickedOut",
    "ERROR": "error",
    "NET_STATE_CHANGE": "netStateChange",
    "SDK_RELOAD": "sdkReload"
  },
  VERSION: "2.10.2"
};
